﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

using Ample.Model;

public partial class Admin_Product_ManageProducts : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }

    protected void gvProducts_RowDataBound(object sender, GridViewRowEventArgs e)
    {
        if (e.Row.RowType == DataControlRowType.DataRow)
        {
            // reference the Delete LinkButton 
            LinkButton db = (LinkButton)e.Row.Cells[0].Controls[3];

            if (db.Text == "Delete")
            {
                db.OnClientClick = string.Format("return confirm('Are you certain you want to delete the item?');");
            }
        } 
    }
}
